package com.atelier.plugin.projectWizard.ui;

import javax.swing.*;
import java.awt.*;

public class CustomTooltipComponent extends JComponent {
    private final String tooltipText;

    public CustomTooltipComponent(String tooltipText) {
        this.tooltipText = tooltipText;
    }

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        // 设置背景颜色
        g.setColor(new Color(255, 204, 204)); // 设置为浅红色
        g.fillRect(0, 0, getWidth(), getHeight());

        // 绘制提示内容
        g.setColor(Color.BLACK);
        g.drawString(tooltipText, 10, 20);
    }
}
